<!--
 * @Author: hashMi 854059946@qq.com
 * @Date: 2023-10-25 22:13:31
 * @LastEditors: hashMi 854059946@qq.com
 * @LastEditTime: 2023-10-25 22:26:26
 * @FilePath: /guiguzhenxuan/src/components/SvgIcon.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="svg-icon">
    <svg :style="{ width: width, height: height }">
      <use :xlink:href="prefix + name" :fill="color"></use>
    </svg>
  </div>
</template>

<script lang="ts" setup>
defineProps({
  name: {
    type: String,
  },
  //xlink:href属性值的前缀
  prefix: {
    type: String,
    default: 'icon-',
  },
  color: {
    type: String,
    default: '',
  },
  width: {
    type: String,
    default: '30px',
  },
  height: {
    type: String,
    default: '30px',
  },
})
</script>

<style lang="scss" scoped>
.svg-icon {
}
</style>
